home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Comms Spectacular / AppleTalk Remote Access / NetComm ARA Scripts V1.1 / NetComm Q Blazer < prev    next >
Encoding:
Text File  |  1994-04-07  |  3.0 KB  |  205 lines  |  [mlts/slnk]

  1. !NetComm Q Blazer V32 - 3rd December 1993 - NJS - v1.0
  2. @ORIGINATE
  3. @ANSWER
  4. !
  5. !Setup modem interface speed
  6. !
  7. @LABEL 1
  8. serreset 1200, 0, 8, 1
  9. dtrset
  10. write "AT&FS51=252\13"
  11. pause 20
  12. serreset 2400, 0, 8, 1
  13. dtrset
  14. write "AT&FS51=252\13"
  15. pause 20
  16. serreset 9600, 0, 8, 1
  17. dtrset
  18. write "AT&FS51=252\13"
  19. pause 20
  20. serreset 19200, 0, 8, 1
  21. dtrset
  22. write "AT&FS51=252\13"
  23. pause 20
  24. !
  25. @LABEL 2
  26. matchclr
  27. matchstr 1 6 "OK\13\10"
  28. matchstr 2 3 "ERROR\13\10"
  29. pause 5
  30. write "ATs50=0X1E0\13"
  31. matchread 30
  32. jump 59
  33. !
  34. !
  35. @LABEL 3
  36. matchclr
  37. matchstr 1 6 "OK\13\10"
  38. write "ATX1E0Q0V1\13"
  39. matchread 30
  40. jump 59
  41. !
  42. !Setup modem for V32 no MNP and hardware flow control
  43. !
  44. @LABEL 6
  45. matchclr
  46. matchstr 1 7 "OK\13\10"
  47. pause 5
  48. write "ATS50=0S180=0S181=1&D0S58=2S68=255&C1S0=0\13"
  49. matchread 30
  50. jump 59
  51. !
  52. !
  53. ! If speaker on flag is true, jump to label 8.  Else turn off the speaker
  54. !
  55. !@LABEL 7
  56. ifstr 2 8 "1"
  57. matchclr
  58. matchstr 1 8 "OK\13\10"
  59. write "ATM0\13"
  60. matchread 30
  61. jump 59
  62. !
  63. ! The modem is ready so enable answering, or originate a call
  64. !
  65. @LABEL 8
  66. pause 5
  67. ifANSWER 30
  68. note "Dialing ^1" 3
  69. write "ATDT^1\13"
  70. !
  71.  
  72. @LABEL 9
  73. matchstr 1 11 "CONNECT 1200"
  74. matchstr 2 12 "CONNECT 2400"
  75. matchstr 3 13 "CONNECT 4800"
  76. matchstr 4 14 "CONNECT 9600"
  77. matchstr 5 50 "NO CARRIER"
  78. matchstr 6 50 "ERROR"
  79. matchstr 7 52 "NO DIALTONE"
  80. matchstr 8 53 "BUSY"
  81. matchstr 9 54 "NO ANSWER"
  82. matchread 700
  83. jump 59
  84. !
  85. @LABEL 11
  86. note "Modem connection established at 1200 bps." 2
  87. CommunicatingAt 1200
  88. jump 15
  89. !
  90. @LABEL 12
  91. note "Modem connection established at 2400 bps." 2
  92. CommunicatingAt 2400
  93. jump 15
  94. !
  95. @LABEL 13
  96. note "Modem connection established at 4800 bps." 2
  97. CommunicatingAt 4800
  98. jump 15
  99. !
  100. @LABEL 14
  101. note "Modem connection established at 9600 bps." 2
  102. CommunicatingAt 9600
  103. jump 15
  104. !
  105. @LABEL 15
  106. HSReset 0 1 0 0 0 1
  107. ifANSWER 16
  108. pause 30
  109. @LABEL 16
  110. exit 0
  111. !
  112. ! Set up the modem to answer
  113. @LABEL 30
  114. write "ATS0=2\13"
  115. matchstr 1 31 "OK\13\10"
  116. matchread 30
  117. jump 59
  118. !
  119. @LABEL 31
  120. matchstr 1  32 "RING"
  121. matchstr 2  11 "CONNECT 1200"
  122. matchstr 3  12 "CONNECT 2400"
  123. matchstr 4  13 "CONNECT 4800"
  124. matchstr 5  14 "CONNECT 9600"
  125. matchstr 6  50 "NO CARRIER"
  126. matchstr 7  50 "ERROR"
  127. matchstr 8  52 "NO DIALTONE"
  128. matchstr 9  53 "BUSY"
  129. matchstr 10  54 "NO ANSWER"
  130. matchread 700
  131. jump 31
  132. !
  133. @LABEL 32
  134. userhook 1
  135. note "Answering phone…" 2
  136. jump 31
  137. !
  138. ! 50: error messages
  139. ! No carrier
  140. @LABEL 50
  141. exit -6021
  142. ! No Dial Tone
  143. @LABEL 52
  144. exit -6020
  145. ! Busy
  146. @LABEL 53
  147. exit -6022
  148. ! No Answer
  149. @LABEL 54
  150. exit -6023
  151. ! Modem error
  152. @LABEL 59
  153. exit -6019
  154. !
  155. ! Hang up the modem
  156. !
  157. @HANGUP
  158. @LABEL 60
  159. settries 0
  160. @LABEL 61
  161. write "ATH\13"
  162. matchclr
  163. matchstr 1 62 "NO CARRIER\13\10"
  164. matchstr 2 62 "OK\13\10"
  165. matchstr 3 62 "ERROR\13\10"
  166. matchread 30
  167. inctries
  168. iftries 3 62
  169. ! no response, try escape sequence
  170. matchclr
  171. matchstr 1 61 "OK\13\10"
  172. write "+++"
  173. matchread 20
  174. jump 61
  175. !
  176. ! Recall the factory settings
  177. !
  178. @LABEL 62
  179. matchclr
  180. matchstr 1 64 "OK\13\10"
  181. matchstr 2 63 "ERROR\13\10"
  182. write "AT&f\13"
  183. matchread 30
  184. !
  185. ! the &F failed, Try ATZ
  186. !
  187. @LABEL 63
  188. matchclr
  189. matchstr 1 65 "OK\13\10"
  190. write "ATZ\13"
  191. matchread 30
  192. !
  193. ! Turn off auto answer
  194. !
  195. @LABEL 64
  196. write "ATS0=0\13"
  197. matchclr
  198. matchstr 1 65 "OK\13\10"
  199. matchread 30
  200. !
  201. @LABEL 65
  202. exit 0
  203.  
  204.